package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 事故链后果节点-防护措施 实体类
 * 表名：risk_chain_consequence_protection
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "risk_chain_consequence_protection")
public class RiskChainConsequenceProtection implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 来源后果节点ID
     */
    @Column(name = "consequence_id", nullable = false, length = 50)
    private String consequenceId;
    
    /**
     * 防护措施ID
     */
    @Column(name = "protection_id", nullable = false)
    private Long protectionId;
    
    /**
     * 防护措施是否有效0：否，1：有效
     * 默认值: 0
     */
    @Column(name = "effective_flag", nullable = false)
    private Boolean effectiveFlag;
    
    /**
     * 是否计算过有效性
     * 默认值: 0
     */
    @Column(name = "evaluated_flag")
    private Boolean evaluatedFlag;
    
    @Override
    public String toString() {
        return "RiskChainConsequenceProtection{" +
            "id=" + id +
            ", consequenceId=" + consequenceId +
            ", protectionId=" + protectionId +
            ", effectiveFlag=" + effectiveFlag +
            ", evaluatedFlag=" + evaluatedFlag +
        '}';
    }
} 